package com.example.courseapp.utils;

import android.content.Context;

/**
 * @Author roman
 * @Date 2024/3/22 16:53
 */
public class DimenUtils {

    public static int dpToPx(Context context, float dp) {
        float density = context.getResources().getDisplayMetrics().density;
        return Math.round(dp * density);
    }
}
